<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <title>人员管理系统</title>
    <style type="text/css">
        body {
            margin-left: 0px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
            background-image: url(images/login/background.png);

        }
    </style>
    <jsp:include page="include.jsp"/>
    <script type="text/javascript">
        function loginsystem()
        {
            $('#login_loginForm').submit();
        }
        
        
       //  function eazySign()
        //{
          //  window.open('${pageContext.request.contextPath}/userAction!eazySign.action');
        //}
        
        
        function validateDqmUser(){
            $.ajax({
                url : '${pageContext.request.contextPath}/userAction!validateDqmUser.action',
                data:serializeObject($('#login_loginForm')),
                dataType :'json',
                cache : false,
                success : function(r1) {
              //  alert("${pageContext.request.contextPath}");
                    if(r1.returnFlag){
                        loginsystem();
                    }else{
                        $.messager.show({
                            title:'登陆信息',
                            msg:r1.returnMsg,
                            showType:'slide'
                        });
                    }
                }
            });
        }
        //获取回车事件:兼容IE和火狐
        $(document).keydown(function(event) {
            if (event.keyCode == 13) {//获取回车键
                validateDqmUser();
            }
        });
        $(document).ready(function(){
            //初始化提示信息
            $("#userid").css({"color":"#808080"});
            $("#userid").val("输入账号");
            if(window!= top){ //session过期,跳出ifream框架
                top.location.href = location.href;
            }
        });

        /*if(window.opener){
         if(typeof window.opener.document!='unknown'){
         window.opener.opener=null;
         window.opener.open('','_self');
         window.opener.close();
         }
         }
         window.onload =function(){
         //窗口最大化
         self.moveTo(0, 0);
         self.resizeTo(window.screen.availWidth, window.screen.availHeight);
         self.resizable = false;
         }*/
    </script>
</head>
<body>
<div align="center">
    <form id="login_loginForm" method="post" action="${pageContext.request.contextPath}/userAction!login.action">
        <table  style="margin-top:60px;vertical-align: middle;" cellpadding="0" cellspacing="0" >
            <tr>
                <td valign="middle" align="right" style="background-image: url('${pageContext.request.contextPath}/images/login/login_background.png');background-repeat: no-repeat;width:906px;height:417px;">
                    <table style="margin-right:35px;width:345px;height:200px;margin-top:50px;">
                        <tr>
                            <td style="height:33px;" valign="middle" >
                                <div style="margin-left:40px;margin-top:15px;height:33px;line-height:33px;background-image:url('${pageContext.request.contextPath}/images/login/input.png');background-repeat: no-repeat;" >
                                    <img src="${pageContext.request.contextPath}/images/login/user_icon.png"  style="float:left;width:32px;height:24px;margin-left:5px;margin-top:2px;line-height:33px;"/>
                                    <input onfocus="this.value=''" type="text" id="userid" name="userid"    size="30"  maxlength="20" style="height:24px;margin-top:4px;margin-left:2px;width:219px;float:left;border:none;vertical-align: middle;line-height:24px;background:url(''); "/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="height:33px" valign="middle">
                                <div style="margin-left:40px;margin-top:15px;height:33px;line-height:33px;background-image:url('${pageContext.request.contextPath}/images/login/input.png');background-repeat: no-repeat;">
                                    <img src="${pageContext.request.contextPath}/images/login/password_icon.png" style="float:left;width:32px;height:24px;margin-left:5px;margin-top:3px;line-height:33px;"/>
                                    <input  type="password" id="userpwd" name="userpwd"  size="30"  maxlength="20" style="height:24px;margin-top:4px;margin-left:2px;width:219px;float:left;border:none;vertical-align: middle;background:url(''); "/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="height:26px" >
                                <div style="margin-top:20px;text-align:left;display: none">
                                    <input type="checkbox" id="" name="" style="margin-left:41px;margin-bottom:2px">&nbsp;记住用户名
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="height:37px;text-align:center">
                                <img onclick="validateDqmUser();" id="login_login" src="${pageContext.request.contextPath}/images/login/login_click.png" alt="#" name="Image5" style="width:131px;height:37px;margin-top:35px;border:none" id="Image5" />
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;height:26px;"><div style="margin-right:15px;margin-top:20px;display:none">忘记密码</div></td>
                        </tr>
                        
                        
                        
                    </table>
                    
                    
                </td>
                
            </tr>
         <%--   <tr>
                            <td style="height:37px;text-align:center">
                                <input type="button" onclick="eazySign();"/>
                            </td>
                        </tr>
                        --%> 
        </table>
    </form>
</div>
</body>
</html>
